﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MvcApplication6.Models;
using MvcApplication6.DAL;

namespace MvcApplication6.BIZ
{
    public class UserBIZ
    {
        UserDAL DAL = new UserDAL();

        public List<UserModel> UserSearchByUser(string name, string password)
        {
            try
            {
                List<UserModel> lst = new List<UserModel>();
                lst = DAL.UserSearchByUser(name, password);

                return lst;
            }
            catch (Exception)
            {
                throw;
            }

        }

        //---------------------UserUpdate-----------------------------
        public int UserUpdate(int id, string name, string password)
        {
            try
            {
                int i = DAL.UserUpdate(id, name, password);

                return i;
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
}